home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00009_column header subtable.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  1.1 KB  |  45 lines

  1. property ancestor
  2.  
  3. on new me, tableName, castName, tableChannel, xLoc, vSlider, HSlider, descendant
  4.   if objectp(descendant) then
  5.     PassVar = descendant
  6.   else
  7.     PassVar = me
  8.   end if
  9.   ancestor = new(script("subtable object"), tableName, castName, tableChannel, xLoc, vSlider, HSlider, PassVar)
  10.   return me
  11. end
  12.  
  13. on trackMouse me
  14.   setThumb(me.pVSlider, 1)
  15.   startCell = cellToPoint(me._me, sprite(me.pTableChannel).mouseCell)
  16.   setAt(startCell, 2, 0)
  17.   trackMouse(me.pSuperTable, startCell)
  18.   return me
  19. end
  20.  
  21. on CalcCenterofRect me, xRect
  22.   if the machineType = 256 then
  23.     SpanHRect = GetSpanHeaderNewRect(me.pSuperTable)
  24.     l = getAt(xRect, 1)
  25.     t = getAt(xRect, 2)
  26.     R = getAt(xRect, 3)
  27.     b = getAt(xRect, 4)
  28.     xCenter = (R - l) / 2
  29.     if ((l mod 2) = 1) and ((R mod 2) = 1) then
  30.       xCenter = xCenter - 1
  31.     end if
  32.     if ((l mod 2) = 0) and ((R mod 2) = 0) then
  33.       xCenter = xCenter - 1
  34.     end if
  35.     if ((l mod 2) = 1) and ((R mod 2) = 0) then
  36.       xCenter = xCenter - 1
  37.     end if
  38.     yCenter = (b - t) / 2
  39.     xPoint = point(l + xCenter, t + yCenter)
  40.   else
  41.     xPoint = RectToLoc(xRect)
  42.   end if
  43.   return xPoint
  44. end
  45.